export interface Meta {
  title: string;
  roles?: string[];
  // 是否是一级菜单,一级菜单的判断方式,isSub字段或者children.length等于1
  // 注意children.length不等于一的时候，显示为一级菜单的路由path要为''
  isSub?: boolean;
  // index越小越靠上,只对含Layout组件的最高级起作用,从0开始
  index?: number;
}
export interface RouteBase {
  path: string;
  name: string;
  component?: any;
  meta?: Meta;
  redirect?: string;
  children?: RouteBase[];
}

// @/router中使用的route定义
export interface Route {
  path?: string;
  element?: JSX.Element;
  component?: React.LazyExoticComponent<() => JSX.Element>;
  children?: Route[];
  meta?: Meta;
}
